<include file="Public/header" title="{$siteSetting['site_seo_title']}" keywords="{$siteSetting['site_seo_keywords']}" description="{$siteSetting['site_seo_description']}" />

	<!-- bootstrap-star-rating
	<link rel="stylesheet" href="__TMPL__Public/assets/plugins/bootstrap-star-rating/css/star-rating.min.css" />
	<script src="__TMPL__Public/assets/plugins/bootstrap-star-rating/js/star-rating.min.js"></script> -->
	
	<!-- FOOTER -->
    <footer class="x-footer">
		<ul class="x-row x-footer-bar with-border-top">
			<li class="x-col-6-12">
				<a href="{:U('Wechat/Index/index')}" class="x-btn x-btn-block x-btn-default x-btn-app">
					<span class="x-thumb">
						<i class="ion-ios-home-outline"></i>
					</span>
					<span class="x-info">主页</span>
				</a>
			</li>
			<li class="x-col-6-12 active">
				<a href="{:U('Customer/Index/center')}" class="x-btn x-btn-block x-btn-default x-btn-app">
					<span class="x-thumb">
						<i class="ion-ios-person"></i>
					</span>
					<span class="x-info">我的</span>
				</a>
			</li>
		</ul>
	</footer>
	<!-- /FOOTER -->
	
	<!-- MAIN -->
    <main class="x-content x-m-b-50">
		<!-- avatar -->
		<div class="blur-img-wrap user-center">
			<img src="__TMPL__Public/assets/images/center/user_bg.jpg" alt="" class="blur-img" />
			<div class="overlay"></div>
			<div class="blur-content">
				<div class="blur-content-body">
					<img src="{$_SESSION['weixinUserInfo']['headimgurl']}" alt="" class="img-responsive img-circle">
					<h3>{$_SESSION['weixinUserInfo']['nickname']}</h3>
					<p>{$customer.tel}</p>
					<div class="x-absolute" style="font-size:0.12rem;bottom:0.15rem;right:0.1rem;">活动卡次数：{$customer.card_times}</div>
				</div><!-- 
				<ul class="x-row blur-content-foot">
					<li class="x-col-6-12">
						<div class="x-btn x-btn-block x-btn-trans x-btn-app">
							<span class="x-thumb">
								<i class="ion-ios-list"></i>
							</span>
							<span class="x-info">订单</span>
						</div>
					</li>
					<li class="x-col-6-12">
						<div class="x-btn x-btn-block x-btn-trans x-btn-app">
							<span class="x-thumb">
								<i class="ion-ios-heart"></i>
							</span>
							<span class="x-info">收藏</span>
						</div>
					</li>
				</ul> -->
			</div>
		</div>
		
		<!-- my menu -->
		<section class="x-box with-border x-m-b-10">
			<div class="x-box-body">
				<ul class="x-row">
					<li class="x-col-12-12 with-border">
						<a href="javascript:;" class="x-row" onclick="getCustBorrowFunc();">
							<label class="x-col-1-10 x-cell-img">
								<img src="__TMPL__Public/assets/img/center/menu3.png" alt="" />
							</label>
							<span class="x-col-8-10 x-p-15">
								我的报名
							</span>
							<span class="x-col-1-10 x-p-15">
								<i class="ion-ios-arrow-forward"></i>
							</span>
						</a>
					</li>
					<li class="x-col-12-12 with-border">
						<a href="javascript:;" class="x-row" onclick="customerDetailFunc();">
							<label class="x-col-1-10 x-cell-img">
			            	<if condition="$_SESSION['weixinUserInfo']['sex'] != 2">
								<img src="__TMPL__Public/assets/img/center/menu5_0.png" alt="" />
							<else />
								<img src="__TMPL__Public/assets/img/center/menu5_1.png" alt="" />
							</if>
							</label>
							<span class="x-col-8-10 x-p-15">
								个人信息
							</span>
							<span class="x-col-1-10 x-p-15">
								<i class="ion-ios-arrow-forward"></i>
							</span>
						</a>
					</li>
				</ul><!-- 
				<#if customer??>
				<#else>
					客户不存在
				</#if> -->
			</div>
		</section>
		
		<!-- sys menu -->
		<section class="x-box with-border x-m-b-10">
			<div class="x-box-body">
				<ul class="x-row">
					<li class="x-col-12-12 with-border">
						<a href="{:U('Card/Index/getCardList')}" class="x-row">
							<label class="x-col-1-10 x-cell-img">
								<img src="__TMPL__Public/assets/img/center/sysmenu1.png" alt="" />
							</label>
							<span class="x-col-8-10 x-p-15">
								购买活动卡
							</span>
							<span class="x-col-1-10 x-p-15">
								<i class="ion-ios-arrow-forward"></i>
							</span>
						</a>
					</li>
					<li class="x-col-12-12 with-border">
						<a href="tel:123456" class="x-row">
							<label class="x-col-1-10 x-cell-img">
								<img src="__TMPL__Public/assets/img/center/sysmenu2.png" alt="" />
							</label>
							<span class="x-col-8-10 x-p-15">
								呼叫客服
							</span>
							<span class="x-col-1-10 x-p-15">
							</span>
						</a>
					</li><!-- 
					<li class="x-col-12-12 with-border">
						<a href="${base}/wx/feedbacks/list.do" class="x-row">
							<label class="x-col-1-10 x-cell-img">
								<img src="__TMPL__Public/assets/img/center/sysmenu3.png" alt="" />
							</label>
							<span class="x-col-8-10 x-p-15">
								留言板
							</span>
							<span class="x-col-1-10 x-p-15">
								<i class="ion-ios-arrow-forward"></i>
							</span>
						</a>
					</li> -->
				</ul>
			</div>
		</section>
	</main>
	<!-- /MAIN -->
    

<script>
$(function () {
});

// customer fav
function customerFavFunc() {
	////// 判断用户是否完善信息
	if (isReg() == false) {
		return false;
	}
	
//	window.location.href = '${base}/wx/customers/my_fav_list.do';
}

// get cust reg order
function getCustBorrowFunc() {
	////// 判断用户是否完善信息
	if (isReg() == false) {
		return false;
	}
	
	window.location.href = "{:U('Borrow/Index/getCustBorrowList')}";
}

// customer detail
function customerDetailFunc() {
	////// 判断用户是否完善信息
	if (isReg() == false) {
		return false;
	}
	
	window.location.href = "{:U('Customer/Index/info')}";
}

////// 判断用户是否完善信息
function isReg() {
//	alert('${customer!}');
	if (!'{$customer}') {
		// show pop confirm for preview
	    xpop({
	       	title: '友情提示',
	        msg: '您还没有完善信息，请完善信息',
	        buttons: [{
	            text: '完善信息',
	            'class': 'weui_btn_dialog primary',
	            handler: function ($this) {
	        		$this.destroy();
	        		window.location.href = "{:U('Customer/Login/register')}";
	            }
	        }]
	    });
	    
	    return false;
	}
	
	return true;
}
</script>
</body>
</html>